<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>添加学生页面</title>
    <link rel="stylesheet" href="css/add_student.css" type="text/css">
    <script src="js/jquery.min.js"></script>
    <style>
        #error {
            background-color: #dfddee;
            color: red;
            text-align: center;
            height: 40px;
            line-height: 40px;
        }
    </style>
</head>
<body>
<div id="error">Error: 学号重复，请核对后重新输入...</div>
<form action="/student_management_system/addStudentServlet" method="post">
    <fieldset>
        <legend>学生档案</legend>
        <label for="stdNo">
            学号:
            <input type="text"
                   pattern="\d*"
                   required autofocus
                   placeholder="请输入学生学号"
                   name="stdNo"
                   id="stdNo">
        </label>
        <label for="stdName">
            姓名: <input type="text"
                       required
                       placeholder="请输入姓名"
                       name="stdName"
                       id="stdName">
        </label>
        <label id="gender">
            性别：
            男 <input type="radio" name="stdGender" value="1" checked>
            &nbsp;
            女 <input type="radio" name="stdGender" value="0">
        </label>
        <label for="birth">
            出生日期：
            <input type="date" name="birthDate" id="birth">
        </label>
        <label class="btn">
            <input type="submit" value="保存" style="color: white">
        </label>
    </fieldset>
</form>

</body>
<script>
    $(function () {
        setTimeout("hide()", 2000);
    })

    function hide() {
        $("#error").slideUp("slow");
    }
</script>
</html>